function [PQ, status] = PQ_Add_Task(PQ, Task, priority)
%PQ_Add_Task Summary of this function goes here
%   Detailed explanation goes here
status = 0;
if (priority < 1) || (priority > PQ.max_priority)
  return;
end

q = size(PQ.queue, 2) + 1;
PQ.queue(q).task = Task;
PQ.queue(q).priority = priority;
status = 1;
end